//
//  FamilyCell.m
//  OST
//
//  Created by mac on 13-7-18.
//  Copyright (c) 2013年 mac. All rights reserved.
//

#import "FamilyCell.h"

@implementation FamilyCell

-(void)initView
{
    UIImage *img1  = [UIImage imageNamed:@"bg_cell"];
    UIImage *img2  = [UIImage imageNamed:@"bg_cell_sel"];
    
    UIImageView *cellbg1 = [[UIImageView alloc]initWithImage:img1];
    UIImageView *cellbg2 = [[UIImageView alloc]initWithImage:img2];
    
    self.backgroundView = cellbg1;
    self.selectedBackgroundView = cellbg2;
}



-(void)setData:(NSDictionary *)object
{
    if (self.data != object ) {
        self.data = object;
    }
    
    self.labelName.text = [self.data objectForKey:@"name"];
}


-(IBAction)openGPS:(id)sender
{
    if (self.delegate) {
        [self.delegate openCurrentPositon:self.data];
    }
}

-(IBAction)openHistory:(id)sender
{
    if (self.delegate) {
        [self.delegate openHistoryPositon:self.data];
    }
}


@end
